
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>7.4 calendar插件 · uniapp/uniapp-x for Harmony教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="5.HBuilderX 中适配鸿蒙插件的安装使用指南.html" />
    
    
    <link rel="prev" href="3.chinese-number-format插件.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.nutpi.net/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.arkui.club/" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">元服务开发实践</a>
      </li><li>
        <a href="https://gitcode.com/nutpi" target="_blank">OpenHarmony应用开发</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    1.前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../chapter2/1.为什么.html">
            
                <a href="../chapter2/1.为什么.html">
            
                    
                    2.为什么要这个专栏？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    3.uniapp开发鸿蒙
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter3/14.背景.md">
            
                <span>
            
                    
                    3.1背景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter3/15.优势.html">
            
                <a href="../chapter3/15.优势.html">
            
                    
                    3.2优势
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter3/1.uniapp开发鸿蒙应用.html">
            
                <a href="../chapter3/1.uniapp开发鸿蒙应用.html">
            
                    
                    3.3uniapp开发鸿蒙应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter3/3.uniapp之uts语言.html">
            
                <a href="../chapter3/3.uniapp之uts语言.html">
            
                    
                    3.4uniapp之uts语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter3/4.uniapp for Harmony.html">
            
                <a href="../chapter3/4.uniapp for Harmony.html">
            
                    
                    3.5uniapp for Harmony
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../chapter3/5.uniapp for Harmony FAQ.html">
            
                <a href="../chapter3/5.uniapp for Harmony FAQ.html">
            
                    
                    3.6uniapp for Harmony FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../chapter3/2.uniapp2.html">
            
                <a href="../chapter3/2.uniapp2.html">
            
                    
                    3.7uniapp2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../chapter3/6.uniappx支持鸿蒙.html">
            
                <a href="../chapter3/6.uniappx支持鸿蒙.html">
            
                    
                    3.8uniappx支持鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../chapter3/7.uniapp-x支持鸿蒙.html">
            
                <a href="../chapter3/7.uniapp-x支持鸿蒙.html">
            
                    
                    3.9uniapp-x支持鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../chapter3/8.目前支持鸿蒙手机.html">
            
                <a href="../chapter3/8.目前支持鸿蒙手机.html">
            
                    
                    3.10目前支持鸿蒙手机
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../chapter3/9.uniapp-x项目开发鸿蒙支持调试啦.html">
            
                <a href="../chapter3/9.uniapp-x项目开发鸿蒙支持调试啦.html">
            
                    
                    3.11uniapp-x项目开发鸿蒙支持调试啦
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../chapter3/10.uniapp和flutter你会选哪个来开发鸿蒙.html">
            
                <a href="../chapter3/10.uniapp和flutter你会选哪个来开发鸿蒙.html">
            
                    
                    3.12uniapp和flutter你会选哪个来开发鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../chapter3/11.Flutter与uni-app的深度对比：鸿蒙开发的最佳选择竟是原生开发.md.md">
            
                <span>
            
                    
                    3.13Flutter与uni-app的深度对比：鸿蒙开发的最佳选择竟是原生开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.14" data-path="../chapter3/12.uniapp版本更新.html">
            
                <a href="../chapter3/12.uniapp版本更新.html">
            
                    
                    3.14uniapp版本更新
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.15" data-path="../chapter3/13.HBuilderX 4.62 开始，uni-app 支持嵌入鸿蒙原生组件.html">
            
                <a href="../chapter3/13.HBuilderX 4.62 开始，uni-app 支持嵌入鸿蒙原生组件.html">
            
                    
                    3.15HBuilderX 4.62开始，uni-app支持嵌入鸿蒙原生组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.16" data-path="../chapter3/16.uni-app x 已经完成鸿蒙等主流平台全覆盖.html">
            
                <a href="../chapter3/16.uni-app x 已经完成鸿蒙等主流平台全覆盖.html">
            
                    
                    3.16uni-app x 已经完成鸿蒙等主流平台全覆盖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.17" data-path="../chapter3/17.uniapp如何进行条件编译到鸿蒙.html">
            
                <a href="../chapter3/17.uniapp如何进行条件编译到鸿蒙.html">
            
                    
                    3.17uniapp如何进行条件编译到鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.18" data-path="../chapter3/18.鸿蒙Next案例分析.html">
            
                <a href="../chapter3/18.鸿蒙Next案例分析.html">
            
                    
                    3.18鸿蒙Next案例分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.19" data-path="../chapter3/19.UTS开发鸿蒙插件.md">
            
                <span>
            
                    
                    3.19UTS开发鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.20" data-path="../chapter3/20.热重载.html">
            
                <a href="../chapter3/20.热重载.html">
            
                    
                    3.20热重载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.21" data-path="../chapter3/21.调用鸿蒙原生组件.html">
            
                <a href="../chapter3/21.调用鸿蒙原生组件.html">
            
                    
                    3.21调用鸿蒙原生组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.22" data-path="../chapter3/22.从开发者视角看 uniapp 与 Flutter 的差异.html">
            
                <a href="../chapter3/22.从开发者视角看 uniapp 与 Flutter 的差异.html">
            
                    
                    3.22从开发者视角看 uniapp 与 Flutter 的差异
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.23" data-path="../chapter3/23.uniappforHarmony学习路线.html">
            
                <a href="../chapter3/23.uniappforHarmony学习路线.html">
            
                    
                    3.23uniappforHarmony学习路线
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    4.随机笑话-实战案例
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter4/1.uni-app_x跨平台实战入门：从0到1开发HarmonyOS_5鸿蒙原生应用.html">
            
                <a href="../chapter4/1.uni-app_x跨平台实战入门：从0到1开发HarmonyOS_5鸿蒙原生应用.html">
            
                    
                    4.1 uni-app x 跨平台实战入门：从 0 到 1 开发 HarmonyOS 5 鸿蒙原生应用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    5.二十四节气
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" >
            
                <span>
            
                    
                    5.1二十四节气实战案例
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    6.UTS插件开发
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../chapter6/1.UTS开发鸿蒙插件.html">
            
                <a href="../chapter6/1.UTS开发鸿蒙插件.html">
            
                    
                    6.1 UTS开发鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../chapter6/2.开发uts插件.html">
            
                <a href="../chapter6/2.开发uts插件.html">
            
                    
                    6.2 开发uts插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../chapter6/3.新建鸿蒙插件.html">
            
                <a href="../chapter6/3.新建鸿蒙插件.html">
            
                    
                    6.3 新建鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../chapter6/4.鸿蒙使用插件.md">
            
                <span>
            
                    
                    6.4 鸿蒙使用插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    7.鸿蒙插件实战
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="1.开发鸿蒙插件.html">
            
                <a href="1.开发鸿蒙插件.html">
            
                    
                    7.1 开发鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.html">
            
                <a href="2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.html">
            
                    
                    7.2 uniappx插件nutpi-idcard开发与使用指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="3.chinese-number-format插件.html">
            
                <a href="3.chinese-number-format插件.html">
            
                    
                    7.3 chinese-number-format插件
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7.4" data-path="4.calendar插件.html">
            
                <a href="4.calendar插件.html">
            
                    
                    7.4 calendar插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="5.HBuilderX 中适配鸿蒙插件的安装使用指南.html">
            
                <a href="5.HBuilderX 中适配鸿蒙插件的安装使用指南.html">
            
                    
                    7.5 HBuilderX中适配鸿蒙插件的安装使用指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="OpenHarmony5.0跟华为HarmonyOS之间的应用生态兼容情况.html">
            
                <a href="OpenHarmony5.0跟华为HarmonyOS之间的应用生态兼容情况.html">
            
                    
                    7.6 OpenHarmony与HarmonyOS兼容性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >7.4 calendar插件</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="vip-container">
                    <h1 id="nutpi-calendar&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x76F8;&#x5173;&#x529F;&#x80FD;&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;"><a name="nutpi-calendar&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x76F8;&#x5173;&#x529F;&#x80FD;&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;" class="plugin-anchor" href="#nutpi-calendar&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x76F8;&#x5173;&#x529F;&#x80FD;&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>nutpi-calendar&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x76F8;&#x5173;&#x529F;&#x80FD;&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;</h1>
<p><code>nutpi-calendar</code> &#x662F;&#x4E00;&#x4E2A;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684; UTS &#x63D2;&#x4EF6;&#xFF0C;&#x7528;&#x4E8E;&#x5904;&#x7406;&#x516C;&#x5386;&#x548C;&#x519C;&#x5386;&#x4E4B;&#x95F4;&#x7684;&#x8F6C;&#x6362;&#xFF0C;&#x83B7;&#x53D6;&#x8282;&#x65E5;&#x4FE1;&#x606F;&#x3001;&#x8282;&#x6C14;&#x3001;&#x751F;&#x8096;&#x3001;&#x5E72;&#x652F;&#x7EAA;&#x5E74;&#x7B49;&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x76F8;&#x5173;&#x529F;&#x80FD;&#x3002;&#x65E8;&#x5728;&#x4E3A; uni-app &#x5F00;&#x53D1;&#x8005;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;&#x7B80;&#x5355;&#x6613;&#x7528;&#x4E14;&#x9AD8;&#x6548;&#x7684;&#x65E5;&#x5386;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#xFF0C;&#x5C24;&#x5176;&#x9002;&#x7528;&#x4E8E;&#x9700;&#x8981;&#x6DF1;&#x5EA6;&#x96C6;&#x6210;&#x4E2D;&#x56FD;&#x519C;&#x5386;&#x529F;&#x80FD;&#x7684;&#x5E94;&#x7528;&#x3002;</p>
<h2 id="&#x7279;&#x6027;"><a name="&#x7279;&#x6027;" class="plugin-anchor" href="#&#x7279;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7279;&#x6027;</h2>
<ul>
<li>&#x516C;&#x5386;&#x8F6C;&#x519C;&#x5386;&#xFF1A;&#x8F7B;&#x677E;&#x5C06;&#x516C;&#x5386;&#x65E5;&#x671F;&#x8F6C;&#x6362;&#x4E3A;&#x8BE6;&#x7EC6;&#x7684;&#x519C;&#x5386;&#x4FE1;&#x606F;&#xFF0C;&#x5305;&#x62EC;&#x519C;&#x5386;&#x5E74;&#x4EFD;&#x3001;&#x6708;&#x4EFD;&#x3001;&#x65E5;&#x671F;&#x3001;&#x662F;&#x5426;&#x95F0;&#x6708;&#x3001;&#x751F;&#x8096;&#x3001;&#x5929;&#x5E72;&#x5730;&#x652F;&#x7B49;&#x3002;</li>
<li>&#x519C;&#x5386;&#x8F6C;&#x516C;&#x5386;&#xFF1A;&#x652F;&#x6301;&#x5C06;&#x519C;&#x5386;&#x65E5;&#x671F;&#x53CD;&#x5411;&#x8F6C;&#x6362;&#x4E3A;&#x516C;&#x5386;&#x65E5;&#x671F;&#x3002;</li>
<li>&#x8282;&#x65E5;&#x4FE1;&#x606F;&#xFF1A;&#x5185;&#x7F6E;&#x516C;&#x5386;&#x8282;&#x65E5;&#x548C;&#x519C;&#x5386;&#x4F20;&#x7EDF;&#x8282;&#x65E5;&#x6570;&#x636E;&#xFF0C;&#x65B9;&#x4FBF;&#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x65E5;&#x671F;&#x7684;&#x8282;&#x65E5;&#x540D;&#x79F0;&#x3002;</li>
<li>&#x8282;&#x6C14;&#x8BA1;&#x7B97;&#xFF1A;&#x51C6;&#x786E;&#x8BA1;&#x7B97;&#x4E8C;&#x5341;&#x56DB;&#x8282;&#x6C14;&#x3002;</li>
<li>&#x81EA;&#x5B9A;&#x4E49;&#x8282;&#x65E5;&#xFF1A;&#x652F;&#x6301;&#x6DFB;&#x52A0;&#x6216;&#x4FEE;&#x6539;&#x8282;&#x65E5;&#x4FE1;&#x606F;&#x3002;</li>
<li>&#x9AD8;&#x6027;&#x80FD;&#xFF1A;&#x57FA;&#x4E8E; UTS &#x5B9E;&#x73B0;&#xFF0C;&#x4FDD;&#x8BC1;&#x5728; App &#x7AEF;&#x7684;&#x539F;&#x751F;&#x6027;&#x80FD;&#x3002;</li>
</ul>
<h2 id="api-&#x6587;&#x6863;"><a name="api-&#x6587;&#x6863;" class="plugin-anchor" href="#api-&#x6587;&#x6863;"><i class="fa fa-link" aria-hidden="true"></i></a>API &#x6587;&#x6863;</h2>
<p>&#x63D2;&#x4EF6;&#x5BFC;&#x51FA;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; <code>calendar</code> &#x7684;&#x5BF9;&#x8C61;&#xFF0C;&#x5305;&#x542B;&#x4EE5;&#x4E0B;&#x4E3B;&#x8981;&#x65B9;&#x6CD5;&#xFF1A;</p>
<ul>
<li><p><code>solar2lunar(year: number, month: number, day: number): LunarDateInfo</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x5C06;&#x516C;&#x5386;&#x65E5;&#x671F;&#x8F6C;&#x6362;&#x4E3A;&#x519C;&#x5386;&#x65E5;&#x671F;&#x4FE1;&#x606F;&#x3002;</li>
<li>&#x53C2;&#x6570;&#xFF1A;<ul>
<li><code>year</code>: &#x516C;&#x5386;&#x5E74;&#x4EFD; (&#x4F8B;&#x5982;: 2024)</li>
<li><code>month</code>: &#x516C;&#x5386;&#x6708;&#x4EFD; (1-12)</li>
<li><code>day</code>: &#x516C;&#x5386;&#x65E5;&#x671F; (1-31)</li>
</ul>
</li>
<li>&#x8FD4;&#x56DE;&#x503C; <code>LunarDateInfo</code> &#x5BF9;&#x8C61;&#xFF0C;&#x5305;&#x542B;&#xFF1A;<ul>
<li><code>lunarYear</code>: number - &#x519C;&#x5386;&#x5E74;&#x4EFD;</li>
<li><code>lunarMonth</code>: number - &#x519C;&#x5386;&#x6708;&#x4EFD;</li>
<li><code>lunarDay</code>: number - &#x519C;&#x5386;&#x65E5;&#x671F;</li>
<li><code>isLeap</code>: boolean - &#x662F;&#x5426;&#x95F0;&#x6708;</li>
<li><code>lunarYearChn</code>: string - &#x519C;&#x5386;&#x5E74;&#x4EFD;&#x4E2D;&#x6587; (&#x4F8B;&#x5982;: &quot;&#x7532;&#x8FB0;&quot;)</li>
<li><code>lunarMonthChn</code>: string - &#x519C;&#x5386;&#x6708;&#x4EFD;&#x4E2D;&#x6587; (&#x4F8B;&#x5982;: &quot;&#x6B63;&#x6708;&quot;)</li>
<li><code>lunarDayChn</code>: string - &#x519C;&#x5386;&#x65E5;&#x671F;&#x4E2D;&#x6587; (&#x4F8B;&#x5982;: &quot;&#x521D;&#x4E00;&quot;)</li>
<li><code>animal</code>: string - &#x751F;&#x8096; (&#x4F8B;&#x5982;: &quot;&#x9F99;&quot;)</li>
<li><code>astro</code>: string - &#x661F;&#x5EA7;</li>
<li><code>gzYear</code>: string - &#x5E72;&#x652F;&#x5E74; (&#x4F8B;&#x5982;: &quot;&#x7532;&#x8FB0;&quot;)</li>
<li><code>gzMonth</code>: string - &#x5E72;&#x652F;&#x6708;</li>
<li><code>gzDay</code>: string - &#x5E72;&#x652F;&#x65E5;</li>
<li><code>solarTerm</code>: string - &#x5F53;&#x65E5;&#x8282;&#x6C14;&#xFF0C;&#x82E5;&#x65E0;&#x5219;&#x4E3A;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;</li>
<li><code>festival</code>: string - &#x516C;&#x5386;&#x8282;&#x65E5;&#xFF0C;&#x82E5;&#x65E0;&#x5219;&#x4E3A;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;</li>
<li><code>lunarFestival</code>: string - &#x519C;&#x5386;&#x8282;&#x65E5;&#xFF0C;&#x82E5;&#x65E0;&#x5219;&#x4E3A;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;</li>
</ul>
</li>
</ul>
</li>
<li><p><code>lunar2solar(lunarYear: number, lunarMonth: number, lunarDay: number, isLeapMonth: boolean = false): SolarDateInfo</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x5C06;&#x519C;&#x5386;&#x65E5;&#x671F;&#x8F6C;&#x6362;&#x4E3A;&#x516C;&#x5386;&#x65E5;&#x671F;&#x4FE1;&#x606F;&#x3002;</li>
<li>&#x53C2;&#x6570;&#xFF1A;<ul>
<li><code>lunarYear</code>: &#x519C;&#x5386;&#x5E74;&#x4EFD;</li>
<li><code>lunarMonth</code>: &#x519C;&#x5386;&#x6708;&#x4EFD;</li>
<li><code>lunarDay</code>: &#x519C;&#x5386;&#x65E5;&#x671F;</li>
<li><code>isLeapMonth</code>: boolean (&#x53EF;&#x9009;, &#x9ED8;&#x8BA4;&#x4E3A; <code>false</code>) - &#x662F;&#x5426;&#x4E3A;&#x95F0;&#x6708;</li>
</ul>
</li>
<li>&#x8FD4;&#x56DE;&#x503C; <code>SolarDateInfo</code> &#x5BF9;&#x8C61;&#xFF0C;&#x5305;&#x542B;&#xFF1A;<ul>
<li><code>year</code>: number - &#x516C;&#x5386;&#x5E74;&#x4EFD;</li>
<li><code>month</code>: number - &#x516C;&#x5386;&#x6708;&#x4EFD;</li>
<li><code>day</code>: number - &#x516C;&#x5386;&#x65E5;&#x671F;</li>
<li><code>weekday</code>: number - &#x661F;&#x671F;&#x51E0; (0 &#x4E3A;&#x5468;&#x65E5;&#xFF0C;1 &#x4E3A;&#x5468;&#x4E00;&#xFF0C;&#x4EE5;&#x6B64;&#x7C7B;&#x63A8;)</li>
<li><code>weekdayChn</code>: string - &#x661F;&#x671F;&#x51E0;&#x4E2D;&#x6587;</li>
</ul>
</li>
</ul>
</li>
<li><p><code>getFestival(year: number, month: number, day: number): string</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x516C;&#x5386;&#x65E5;&#x671F;&#x7684;&#x516C;&#x5386;&#x8282;&#x65E5;&#x540D;&#x79F0;&#x3002;</li>
<li>&#x53C2;&#x6570;&#xFF1A;&#x540C; <code>solar2lunar</code></li>
<li>&#x8FD4;&#x56DE;&#x503C;&#xFF1A;&#x8282;&#x65E5;&#x540D;&#x79F0;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x82E5;&#x65E0;&#x5219;&#x4E3A;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;&#x3002;</li>
</ul>
</li>
<li><p><code>getLunarFestival(lunarYear: number, lunarMonth: number, lunarDay: number): string</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x519C;&#x5386;&#x65E5;&#x671F;&#x7684;&#x519C;&#x5386;&#x8282;&#x65E5;&#x540D;&#x79F0;&#x3002;</li>
<li>&#x53C2;&#x6570;&#xFF1A;&#x540C; <code>lunar2solar</code> (&#x65E0;&#x9700; <code>isLeapMonth</code>)</li>
<li>&#x8FD4;&#x56DE;&#x503C;&#xFF1A;&#x8282;&#x65E5;&#x540D;&#x79F0;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x82E5;&#x65E0;&#x5219;&#x4E3A;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;&#x3002;</li>
</ul>
</li>
<li><p><code>setFestival(month: number, day: number, festivalName: string): void</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x8BBE;&#x7F6E;&#x6216;&#x8986;&#x76D6;&#x516C;&#x5386;&#x8282;&#x65E5;&#x3002;</li>
<li>&#x53C2;&#x6570;&#xFF1A;<ul>
<li><code>month</code>: &#x516C;&#x5386;&#x6708;&#x4EFD;</li>
<li><code>day</code>: &#x516C;&#x5386;&#x65E5;&#x671F;</li>
<li><code>festivalName</code>: &#x8282;&#x65E5;&#x540D;&#x79F0;&#x3002;&#x5982;&#x679C;&#x4F20;&#x5165;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5219;&#x8868;&#x793A;&#x5220;&#x9664;&#x8BE5;&#x8282;&#x65E5;&#x3002;</li>
</ul>
</li>
</ul>
</li>
<li><p><code>setLunarFestival(lunarMonth: number, lunarDay: number, festivalName: string): void</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x8BBE;&#x7F6E;&#x6216;&#x8986;&#x76D6;&#x519C;&#x5386;&#x8282;&#x65E5;&#x3002;</li>
<li>&#x53C2;&#x6570;&#xFF1A;<ul>
<li><code>lunarMonth</code>: &#x519C;&#x5386;&#x6708;&#x4EFD;</li>
<li><code>lunarDay</code>: &#x519C;&#x5386;&#x65E5;&#x671F;</li>
<li><code>festivalName</code>: &#x8282;&#x65E5;&#x540D;&#x79F0;&#x3002;&#x5982;&#x679C;&#x4F20;&#x5165;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5219;&#x8868;&#x793A;&#x5220;&#x9664;&#x8BE5;&#x8282;&#x65E5;&#x3002;</li>
</ul>
</li>
</ul>
</li>
<li><p><code>getTerm(year: number, month: number, day: number): string</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x516C;&#x5386;&#x65E5;&#x671F;&#x7684;&#x8282;&#x6C14;&#x540D;&#x79F0; (&#x6B64;&#x65B9;&#x6CD5;&#x5B9E;&#x9645;&#x901A;&#x8FC7; <code>solar2lunar</code> &#x7684;&#x8FD4;&#x56DE;&#x503C;&#x7684; <code>solarTerm</code> &#x5C5E;&#x6027;&#x83B7;&#x53D6;)&#x3002;</li>
</ul>
</li>
<li><p><code>toGanZhiYear(year: number): string</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x516C;&#x5386;&#x5E74;&#x4EFD;&#x7684;&#x5E72;&#x652F;&#x7EAA;&#x5E74;&#x3002;</li>
</ul>
</li>
<li><p><code>getAnimal(year: number): string</code></p>
<ul>
<li>&#x63CF;&#x8FF0;&#xFF1A;&#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x516C;&#x5386;&#x5E74;&#x4EFD;&#x7684;&#x751F;&#x8096;&#x3002;</li>
</ul>
</li>
</ul>
<h2 id="&#x4F7F;&#x7528;&#x6848;&#x4F8B;"><a name="&#x4F7F;&#x7528;&#x6848;&#x4F8B;" class="plugin-anchor" href="#&#x4F7F;&#x7528;&#x6848;&#x4F8B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4F7F;&#x7528;&#x6848;&#x4F8B;</h2>
<p>&#x4EE5;&#x4E0B;&#x662F;&#x5982;&#x4F55;&#x5728;&#x60A8;&#x7684; uni-app x &#x9879;&#x76EE;&#x4E2D;&#x4F7F;&#x7528; <code>nutpi-calendar</code> &#x63D2;&#x4EF6;&#xFF1A;</p>
<ol>
<li><p><strong>&#x5F15;&#x5165;&#x63D2;&#x4EF6;</strong></p>
<p>&#x5728;&#x60A8;&#x7684; <code>.uvue</code> &#x6216; <code>.uts</code> &#x6587;&#x4EF6;&#x4E2D;&#x5F15;&#x5165;&#x63D2;&#x4EF6;&#xFF1A;</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> calendar from <span class="hljs-string">&quot;@/uni_modules/nutpi-calendar&quot;</span>;
</code></pre>
</li>
<li><p><strong>&#x8C03;&#x7528; API</strong></p>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x5728;&#x9875;&#x9762;&#x7684; script &#x90E8;&#x5206;</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
  onLoad() {
    <span class="hljs-comment">// &#x516C;&#x5386;&#x8F6C;&#x519C;&#x5386;</span>
    <span class="hljs-keyword">const</span> today = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>();
    <span class="hljs-keyword">const</span> lunarDate = calendar.solar2lunar(
      today.getFullYear(),
      today.getMonth() + <span class="hljs-number">1</span>,
      today.getDate()
    );
    <span class="hljs-built_in">console</span>.log(
      <span class="hljs-string">`&#x4ECA;&#x5929;&#x662F;&#x519C;&#x5386;&#xFF1A;<span class="hljs-subst">${lunarDate.lunarYearChn}</span>&#x5E74; <span class="hljs-subst">${lunarDate.lunarMonthChn}</span><span class="hljs-subst">${lunarDate.lunarDayChn}</span>`</span>
    );
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`&#x751F;&#x8096;&#xFF1A;<span class="hljs-subst">${lunarDate.animal}</span>`</span>);
    <span class="hljs-keyword">if</span> (lunarDate.solarTerm) {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`&#x8282;&#x6C14;&#xFF1A;<span class="hljs-subst">${lunarDate.solarTerm}</span>`</span>);
    }
    <span class="hljs-keyword">if</span> (lunarDate.festival) {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`&#x516C;&#x5386;&#x8282;&#x65E5;&#xFF1A;<span class="hljs-subst">${lunarDate.festival}</span>`</span>);
    }
    <span class="hljs-keyword">if</span> (lunarDate.lunarFestival) {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`&#x519C;&#x5386;&#x8282;&#x65E5;&#xFF1A;<span class="hljs-subst">${lunarDate.lunarFestival}</span>`</span>);
    }

    <span class="hljs-comment">// &#x519C;&#x5386;&#x8F6C;&#x516C;&#x5386; (&#x4F8B;&#x5982;&#xFF1A;&#x67E5;&#x8BE2;2024&#x5E74;&#x6B63;&#x6708;&#x521D;&#x4E00;&#x7684;&#x516C;&#x5386;&#x65E5;&#x671F;)</span>
    <span class="hljs-keyword">const</span> solarDate = calendar.lunar2solar(<span class="hljs-number">2024</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>);
    <span class="hljs-built_in">console</span>.log(
      <span class="hljs-string">`2024&#x5E74;&#x6B63;&#x6708;&#x521D;&#x4E00;&#x7684;&#x516C;&#x5386;&#x65E5;&#x671F;&#x662F;&#xFF1A;<span class="hljs-subst">${solarDate.year}</span>-<span class="hljs-subst">${solarDate.month}</span>-<span class="hljs-subst">${solarDate.day}</span>`</span>
    );

    <span class="hljs-comment">// &#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x65E5;&#x671F;&#x7684;&#x8282;&#x65E5;</span>
    <span class="hljs-keyword">const</span> christmas = calendar.getFestival(today.getFullYear(), <span class="hljs-number">12</span>, <span class="hljs-number">25</span>);
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`12&#x6708;25&#x65E5;&#x662F;&#xFF1A;<span class="hljs-subst">${christmas}</span>`</span>);

    <span class="hljs-keyword">const</span> springFestival = calendar.getLunarFestival(<span class="hljs-number">2025</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>); <span class="hljs-comment">// &#x67E5;&#x8BE2;2025&#x5E74;&#x6625;&#x8282;</span>
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`2025&#x5E74;&#x519C;&#x5386;&#x6B63;&#x6708;&#x521D;&#x4E00;&#x662F;&#xFF1A;<span class="hljs-subst">${springFestival}</span>`</span>);

    <span class="hljs-comment">// &#x8BBE;&#x7F6E;&#x81EA;&#x5B9A;&#x4E49;&#x8282;&#x65E5;</span>
    calendar.setFestival(<span class="hljs-number">10</span>, <span class="hljs-number">24</span>, <span class="hljs-string">&quot;&#x7A0B;&#x5E8F;&#x5458;&#x8282;&quot;</span>);
    <span class="hljs-keyword">const</span> programmersDay = calendar.getFestival(
      today.getFullYear(),
      <span class="hljs-number">10</span>,
      <span class="hljs-number">24</span>
    );
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`10&#x6708;24&#x65E5;&#x662F;&#xFF1A;<span class="hljs-subst">${programmersDay}</span>`</span>);
  },
};
</code></pre>
</li>
</ol>
<h2 id="&#x7248;&#x6743;&#x4FE1;&#x606F;"><a name="&#x7248;&#x6743;&#x4FE1;&#x606F;" class="plugin-anchor" href="#&#x7248;&#x6743;&#x4FE1;&#x606F;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7248;&#x6743;&#x4FE1;&#x606F;</h2>
<ul>
<li><strong>&#x4F5C;&#x8005;</strong>&#xFF1A;&#x575A;&#x679C;&#x6D3E; </li>
<li><strong>&#x516C;&#x4F17;&#x53F7;</strong>&#xFF1A;nutpi</li>
<li><strong>&#x7535;&#x8BDD;</strong>&#xFF1A;17752170152</li>
<li><strong>&#x5B98;&#x7F51;</strong>&#xFF1A;<a href="https://www.nutpi.net/" target="_blank">https://www.nutpi.net/</a> </li>
</ul>
<h2 id="&#x76F8;&#x5173;&#x94FE;&#x63A5;"><a name="&#x76F8;&#x5173;&#x94FE;&#x63A5;" class="plugin-anchor" href="#&#x76F8;&#x5173;&#x94FE;&#x63A5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x76F8;&#x5173;&#x94FE;&#x63A5;</h2>
<ul>
<li><a href="https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html" target="_blank">UTS &#x8BED;&#x6CD5;</a></li>
<li><a href="https://uniapp.dcloud.net.cn/plugin/uts-plugin.html" target="_blank">UTS API &#x63D2;&#x4EF6;</a></li>
<li><a href="https://gitcode.net/dcloud/hello-uts" target="_blank">Hello UTS</a></li>
<li>&#x63D2;&#x4EF6;&#x5730;&#x5740;&#xFF1A;<a href="https://ext.dcloud.net.cn/plugin?id=23786" target="_blank">https://ext.dcloud.net.cn/plugin?id=23786</a></li>
<li>&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;<a href="https://gitcode.com/nutpi/uni-calendar" target="_blank">https://gitcode.com/nutpi/uni-calendar</a></li>
</ul>
<h2 id="&#x575A;&#x679C;&#x6D3E;uni-app-x&#x63D2;&#x4EF6;"><a name="&#x575A;&#x679C;&#x6D3E;uni-app-x&#x63D2;&#x4EF6;" class="plugin-anchor" href="#&#x575A;&#x679C;&#x6D3E;uni-app-x&#x63D2;&#x4EF6;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x575A;&#x679C;&#x6D3E;uni-app X&#x63D2;&#x4EF6;</h2>
<ol>
<li><p><strong>nutpi-idcard</strong>&#xFF1A;&#x7528;&#x4E8E;&#x89E3;&#x6790;&#x8EAB;&#x4EFD;&#x8BC1;&#x53F7;&#x7801;&#xFF0C;&#x63D0;&#x53D6;&#x5176;&#x4E2D;&#x7684;&#x5173;&#x952E;&#x4FE1;&#x606F;&#xFF0C;&#x5982;&#x5730;&#x533A;&#x3001;&#x51FA;&#x751F;&#x65E5;&#x671F;&#x3001;&#x6027;&#x522B;&#x7B49;&#x3002;&#x652F;&#x6301;&#x4E2D;&#x56FD;&#x5C45;&#x6C11;&#x8EAB;&#x4EFD;&#x8BC1;&#x3001;&#x6E2F;&#x6FB3;&#x53F0;&#x5C45;&#x6C11;&#x5C45;&#x4F4F;&#x8BC1;&#x4EE5;&#x53CA;&#x5916;&#x56FD;&#x4EBA;&#x6C38;&#x4E45;&#x5C45;&#x7559;&#x8EAB;&#x4EFD;&#x8BC1;&#x7684;&#x63D2;&#x4EF6;&#x3002;&#x63D2;&#x4EF6;&#x5730;&#x5740;&#xFF1A;<a href="https://ext.dcloud.net.cn/plugin?id=23728&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-idcard&#x3002;" target="_blank">https://ext.dcloud.net.cn/plugin?id=23728&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-idcard&#x3002;</a></p>
</li>
<li><p><strong>nutpi-chinese-number-format</strong>&#xFF1A;&#x4E00;&#x4E2A;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316; UTS &#x63D2;&#x4EF6;&#xFF0C;&#x652F;&#x6301;&#x6570;&#x5B57;&#x4E0E;&#x4E2D;&#x6587;&#x4E4B;&#x95F4;&#x7684;&#x53CC;&#x5411;&#x8F6C;&#x6362;&#xFF0C;&#x9002;&#x7528;&#x4E8E; uni-app &#x548C; uni-app x &#x9879;&#x76EE;&#x3002;&#x63D2;&#x4EF6;&#x5730;&#x5740;&#xFF1A;<a href="https://ext.dcloud.net.cn/plugin?id=23776&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-chinese-number-format/&#x3002;" target="_blank">https://ext.dcloud.net.cn/plugin?id=23776&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-chinese-number-format/&#x3002;</a></p>
</li>
<li><p><strong>nutpi-utils</strong>&#xFF1A;&#x652F;&#x6301;&#x9E3F;&#x8499;&#x7684;&#x62E8;&#x6253;&#x7535;&#x8BDD;&#xFF0C;&#x53D1;&#x77ED;&#x4FE1;&#x3001;&#x9000;&#x51FA;&#x5E94;&#x7528;&#x3001;&#x7535;&#x91CF;&#x83B7;&#x53D6;&#x7B49;&#x529F;&#x80FD;&#x3002;&#x63D2;&#x4EF6;&#x5730;&#x5740;&#xFF1A;<a href="https://ext.dcloud.net.cn/plugin?id=22525&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-utils&#x3002;" target="_blank">https://ext.dcloud.net.cn/plugin?id=22525&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-utils&#x3002;</a></p>
</li>
<li><p><strong>calendar&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;</strong>&#xFF1A;<code>nutpi-calendar</code> &#x662F;&#x4E00;&#x4E2A;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684; UTS &#x63D2;&#x4EF6;&#xFF0C;&#x7528;&#x4E8E;&#x5904;&#x7406;&#x516C;&#x5386;&#x548C;&#x519C;&#x5386;&#x4E4B;&#x95F4;&#x7684;&#x8F6C;&#x6362;&#xFF0C;&#x83B7;&#x53D6;&#x8282;&#x65E5;&#x4FE1;&#x606F;&#x3001;&#x8282;&#x6C14;&#x3001;&#x751F;&#x8096;&#x3001;&#x5E72;&#x652F;&#x7EAA;&#x5E74;&#x7B49;&#x4E2D;&#x56FD;&#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x76F8;&#x5173;&#x529F;&#x80FD;&#x3002;&#x63D2;&#x4EF6;&#x5730;&#x5740;&#xFF1A;<a href="https://ext.dcloud.net.cn/plugin?id=23786&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-calendar&#x3002;" target="_blank">https://ext.dcloud.net.cn/plugin?id=23786&#xFF0C;&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;https://gitcode.com/nutpi/uni-calendar&#x3002;</a> </p>
</li>
</ol>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-06-09 21:17:16
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://my.openwrite.cn/js/readmore.js"></script>
                <script>
                    var enablePlugin = false;
                    var allowDomain = "localhost";
                    if(allowDomain){
                        var currentDomain = location.hostname;
                        if ($.isArray(allowDomain)) {
                            $.each(allowDomain, function(index, item) {
                                if (currentDomain == item) {
                                    enablePlugin = true;
                                    return false;
                                }
                            });
                        }else{
                           if (currentDomain == allowDomain) {
                                enablePlugin = true;
                            }
                        }
                    }else{
                        enablePlugin = true;
                    }
                    
                    if(enablePlugin){
                        var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                        if (!isMobile) {
                            var btw = new BTWPlugin();
                            btw.init({"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果","id":"vip-container"});
                        }
                    }
                </script> 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="3.chinese-number-format插件.html"
      class="
        navigation navigation-prev
        
      "
      aria-label="Previous page: 7.3 chinese-number-format插件"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="5.HBuilderX 中适配鸿蒙插件的安装使用指南.html"
      class="
        navigation navigation-next
        
      "
      aria-label="Next page: 7.5 HBuilderX中适配鸿蒙插件的安装使用指南"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"7.4 calendar插件","level":"1.7.4","depth":2,"next":{"title":"7.5 HBuilderX中适配鸿蒙插件的安装使用指南","level":"1.7.5","depth":2,"path":"chapter7/5.HBuilderX 中适配鸿蒙插件的安装使用指南.md","ref":"./chapter7/5.HBuilderX 中适配鸿蒙插件的安装使用指南.md","articles":[]},"previous":{"title":"7.3 chinese-number-format插件","level":"1.7.3","depth":2,"path":"chapter7/3.chinese-number-format插件.md","ref":"./chapter7/3.chinese-number-format插件.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.nutpi.net/","name":"坚果派官网"},{"target":"_blank","url":"https://www.arkui.club/","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"元服务开发实践"},{"target":"_blank","url":"https://gitcode.com/nutpi","name":"OpenHarmony应用开发"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"uniapp/uniapp-x for Harmony教程","language":"zh-hans","gitbook":"*","description":"uniapp/uniapp-x for Harmony电子书教程"},"file":{"path":"chapter7/4.calendar插件.md","mtime":"2025-06-09T13:17:16.377Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-06-30T01:19:14.211Z"},"basePath":"..","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

